//
//  LikeCell.m
//  HYHOME
//
//  Created by dllo on 16/2/24.
//  Copyright © 2016年 Mac. All rights reserved.
//

#import "LikeCell.h"
#import "Modelcontent.h"
#import "UIImageView+WebCache.h"
#import "DKNightVersion.h"
@implementation LikeCell

- (void)dealloc{
    [self.imageForSave release];
    [self.labelForTitle release];
    [super dealloc];

}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.imageForSave = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imageForSave];
        
        
        self.labelForTitle =[[UILabel alloc]init];
        [self.contentView addSubview:self.labelForTitle];
        
        
        
        [self.imageForSave release];
        [self.labelForTitle release];
        
    }
    
    return self;


}


- (void)layoutSubviews{
    [super layoutSubviews];
    self.imageForSave.frame = CGRectMake(10, 10,100, 100);
   
    self.labelForTitle.frame = CGRectMake(120, 30, self.frame.size.width - 130, 50);
    
    
    


}

- (void)passModel:(Modelcontent *)model{


    
    [self.imageForSave sd_setImageWithURL:[NSURL URLWithString:model.cover_image_url] placeholderImage:[UIImage imageNamed:@"jz"]];
    
    self.labelForTitle.text = model.title;
    self.labelForTitle.numberOfLines = 0;
    self.labelForTitle.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor lightGrayColor]);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
